package com.base.common.persistent.dao;

import com.base.common.persistent.model.HousePostingDetails;
import com.cjy.common.annotation.MyBatisRepository;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@MyBatisRepository
public interface HousePostingDetailsMapper {
	
	/**
	 * 添加房屋信息发布记录
	 * 
	 * @param housePostingDetails
	 * @return
	 */
	int addHousePostingDetails(HousePostingDetails housePostingDetails);
	
	/**
	 * 查询房屋发布记录最新code
	 * @param pre 
	 * 
	 * @return
	 */
	String queryLastCode(@Param(value = "pre") String pre);

	/**
	 * 根据类别查询总条数
	 * 
	 * @param categories
	 * @param status 
	 * @param publisher 
	 * @return
	 */
	int queryCountsByCategories(@Param(value = "categories") int categories, @Param(value = "status") int status, @Param(value = "publisher") int publisher);

	/**
	 * 根据类别状态查询记录列表
	 * 
	 * @param start
	 * @param num
	 * @param categories
	 * @param status
	 * @param publisher
	 * @return
	 */
	List<HousePostingDetails> queryHousePosingList(@Param(value = "start") int start, @Param(value = "num") int num, @Param(value = "categories") int categories, @Param(value = "status") int status, @Param(value = "publisher") int publisher);
}
